<{* $Id: weblinks_category_navi.html 225 2008-03-03 06:33:58Z mikhail.miguel $ *}>

<table class="weblinks_frame_category">

<{* -- Start main category loop -- *}>
<{foreach name=weblinks_main_category item=main from=$main_categories}>

<{* -- open table row -- *}>
  <{if $category_cols == 1}>
    <tr>
  <{elseif $smarty.foreach.weblinks_main_category.iteration mod $category_cols == 1}>
    <tr>
  <{/if}>

<{* -- open table column -- *}>
  <td class="weblinks_main_category" width="<{$category_width}>%">

  <{if $category_image_mode == 1}>
    <a href="<{$xoops_url}>/modules/<{$dirname}>/viewcat.php?cid=<{$main.cid}>&amp;keywords=<{$keywords}>">
      <img src="<{$xoops_url}>/modules/<{$dirname}>/images/dir.gif" border="0" alt="category" />
      </a>&nbsp;
  <{elseif ($category_image_mode == 2)||($category_image_mode == 3)}>
    <a href="<{$xoops_url}>/modules/<{$dirname}>/viewcat.php?cid=<{$main.cid}>&amp;keywords=<{$keywords}>">
    <{if $main.imgurl_s }>
      <{if ($main.img_show_width != 0) && ($main.img_show_height != 0)}>
        <img src="<{$main.imgurl_s}>" border="0" width="<{$main.img_show_width}>" height="<{$main.img_show_height}>" alt="category" />
      <{else}>
        <img src="<{$main.imgurl_s}>" border="0" alt="category image" />
      <{/if}>
      </a><br />
    <{else}>
      <img src="<{$xoops_url}>/modules/<{$dirname}>/images/dir.gif" border="0" alt="category" />
      </a>&nbsp;
    <{/if}>
  <{/if}>

  <a href="<{$xoops_url}>/modules/<{$dirname}>/viewcat.php?cid=<{$main.cid}>&amp;keywords=<{$keywords}>">
  <span class="weblinks_main_category_title"><{$main.title_s}></span>
  </a> (<{$main.link_count}>)
  <br />

  <span class="weblinks_sub_category">

<{* -- Start sub category loop -- *}>
  <{foreach name=weblinks_sub_category item=sub from=$main.sub_categories}>
    <{if $sub.cid > 0}>
      <a href="<{$xoops_url}>/modules/<{$dirname}>/viewcat.php?cid=<{$sub.cid}>&amp;keywords=<{$keywords}>"><{$sub.title_s}></a>
      <{if !$smarty.foreach.weblinks_sub_category.last }>
        , 
      <{/if}>
    <{else}>
      ...
    <{/if}>
  <{/foreach}>
<{* -- End sub category loop -- *}>

  </span>

<{* -- open table column -- *}>
  </td>

<{* -- close table row -- *}>
  <{if $category_cols == 1}>
    </tr>
  <{elseif $smarty.foreach.weblinks_main_category.iteration is div by $category_cols}>
    </tr>
  <{/if}>

<{/foreach}>
<{* -- End main category loop -- *}>

<{* -- Start remain category loop -- *}>
<{section name=weblinks_cols_remainder loop=$cols_remainder}>
  <td class="weblinks_main_category" width="<{$category_width}>">
  &nbsp;
  </td>

<{* -- close table row -- *}>
  <{if $smarty.section.weblinks_cols_remainder.last}>
    </tr>
  <{/if}>

<{/section}>
<{* -- End remain category loop -- *}>

</table>
